package com.epic.rest;

import org.camunda.bpm.engine.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;

@Path("/v1/process")
@Component("ProcessResource")
public class ProcessResources {

//    @Autowired
//    private ProcessEngineServices processEngineServices;

    @Autowired
    private RuntimeService runtimeService;

    @Autowired
    private RepositoryService repositoryService;

    @Autowired
    private HistoryService historyService;

    @Autowired
    private FormService formService;

    @Autowired
    private IdentityService identityService;

    @Autowired
    private TaskService taskService;

    @Autowired
    private FilterService filterService;

    @Autowired
    private CaseService caseService;

    @Autowired
    private DecisionService decisionService;

    @Autowired
    private ExternalTaskService externalTaskService;

    @Autowired
    private ManagementService managementService;

    @Path("test")
    @GET
    @Produces("application/json;charset=UTF-8")
    public String test(@Context HttpServletRequest request,
                       @QueryParam("args") String args){

        try{
            return "hello process ok";
        }catch (Exception e){
        }
        return "error";
    }
}
